package org.example.flea_market_mvc.enums;

/**
 * 订单状态枚举类
 * 定义订单全生命周期的状态码和描述
 */
public enum OrderStatusEnum {
    PENDING_PAYMENT(1, "待支付"),
    PAID(2, "已支付"),
    SHIPPED(3, "已发货"),
    RECEIVED(4, "已收货"),
    COMPLETED(5, "已完成"),
    CANCELLED(6, "已取消"),
    REFUNDING(7, "退款中"),
    REFUNDED(8, "已退款");

    private final int code;      // 状态代码
    private final String description;  // 状态描述

    OrderStatusEnum(int code, String description) {
        this.code = code;
        this.description = description;
    }

    public int getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }
}